package cupk.cars;

import cupk.cars.entities.EntityAudi;
import cupk.cars.entities.EntityBenz;

public class Factory {
    public static Cars getCarName(String carName){
        Cars car=null;
        if (carName == "奔驰"){
            car = new EntityBenz();
        } else if(carName == "奥迪"){
            car = new EntityAudi();
        }
        return car;
    }
}